﻿@model YSC_OpenPlatform_API.Entity.FishSpecies
@{
    ViewData["Title"] = "MediaEdit";
}

@section Scripts
    {

    <script type="text/javascript">
        var selfLayer = null, page = 1, active = null;
        layui.use(['layer', 'table', 'laydate', 'form'], function () {
            var form = layui.form;
            picker.GetTypeDictionaryList(layui.form, { type: "鱼种" }, $("#typeId").val());
            //监听提交
            form.on('submit(submit)', function (data) {              
                axios({
                    method: 'post',
                    url: '/FishSpecies/AddMediaFishSpecies',
                    //headers: {
                    //    'content-type': 'application/x-www-form-urlencoded'
                    //},
                    data: data.field
                })
                    .then(function (response) {
                        console.log(response);
                        if (response.data.Code == 200) {
                            javascript: history.go(-1);
                        } else {
                            alert(response.msg)
                        }

                    }).catch(function (error) {
                        console.log(error);
                    });

                console.log(data);
                return false;
            });


        });
    </script>
}

<form class="layui-form layui-form-pane" asp-action="Edit">
    <input type="hidden" id="typeId" name="typeId" asp-for="Type" />
    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input w_545" autocomplete="off" lay-verify="required" disabled="disabled" asp-for="FishName">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">鱼种俗名</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input w_545" autocomplete="off" lay-verify="required" asp-for="SuName">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">英文名</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input w_545" autocomplete="off" lay-verify="required" asp-for="EnglishName">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">拉丁文名</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input w_545" autocomplete="off" lay-verify="required" asp-for="LatinName">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">提示</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input w_545" autocomplete="off" asp-for="TiShi">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">介绍</label>
        <div class="layui-input-block">
            <textarea asp-for="Introduction" style="width:545px;height:100px"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">烹饪</label>
        <div class="layui-input-block">
            <textarea asp-for="PengRen" style="width:545px;height:100px"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">选购</label>
        <div class="layui-input-block">
            <textarea asp-for="XuanGou" style="width:545px;height:100px"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">保鲜/营养</label>
        <div class="layui-input-block">
            <textarea asp-for="BaoXian" style="width:545px;height:100px"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <textarea asp-for="Remarks" style="width:545px;height:100px"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input class="layui-btn" type="button" style="width: 100px" lay-submit lay-filter="submit" value="立即提交" />
            <button type="reset" style="width: 100px" class="layui-btn layui-btn-primary">重置</button>
            <a style="width: 100px" class="layui-btn layui-btn-primary backIframe" asp-action="AppList">返回</a>
        </div>
    </div>
    <input type="hidden" asp-for="Id" />
</form>


